<div class="topBack" style="height:40px;">&nbsp;<!--<img src="/images/back_jiantou.png" style="width:40px;height:40px;">--></div>
<div class="topContent">快速充值</div>
<div class="topRight">&nbsp;</div>
<div class="clear"></div>

<div class="diffDiv"></div>
<div class="rechargeLeft">账&nbsp;&nbsp;&nbsp;&nbsp;户</div>
<div class="rechargeRight"><input id="tel" type="text" placeholder="请填写手机号码"></div>

<div class="clear"></div>
<div class="diffDiv"></div>

<div class="rechargeLeft">充值金额</div>
<div class="rechargeRight">&nbsp;</div>
<div class="clear"></div>

<div style="width:96%;margin:0px auto;">
<?php 
	if(!empty($this->topupRoleList)){
		foreach($this->topupRoleList as $t){
			echo '
				<div class="rechargePrice" tag="';
					if(array_key_exists('id',$t)&& !empty($t->id))echo $t->id;
					echo '" onclick="javascript:choosePrice(this);return false;">';
					if(array_key_exists('amount',$t)&& !empty($t->amount)) echo $t->amount;echo '元';
				if(array_key_exists('present',$t) && !empty($t->present) && $t->present>0){
					echo '<span style="color:red;font-size:0.8em;"><br>（赠';
					if(array_key_exists('present',$t)&& !empty($t->present)) echo $t->present;echo '）</span>';
				}else{
					echo '<span style="font-size:0.8em;"><br>（售';
					if(array_key_exists('amount',$t)&& !empty($t->amount))
					echo $t->amount;
					echo '）</span>';
				}
				echo '</div>
			';
		}
		echo '<input type="hidden" id="roleId" value="0">';
	}
?>
</div>
<div class="clear"></div>
<div class="diffDiv" style="margin-top:20px;"></div>

<div class="rechargeLeft">支付方式</div>
<div class="rechargeRight">&nbsp;</div>
<div class="clear"></div>

<div class="floatleft" tag="weixin"  style=""><img class="zhifu_img" src="/images/weixin.png">&nbsp;<span style="position:relative;top:5px;">微信支付</span></div>
<div class="floatright gou_position" tag="weixin"  id="weixin_zhifu"><img src="/images/yigou.png" class="gougou"></div>
<div class="clear"></div>
<div style="text-align:center;">
<input type="button" id="rechargeBtn" onclick="javascript:submitRecharge();return false;" value="确认提交" class="rechargeBtn">
</div>
<div id="errMsg" style="text-align:center;color:red;padding:10px 0px;"></div>

<script type="text/javascript">
	$(document).ready(function(){
		var firstObj = $('.rechargePrice:nth-child(1)');
		firstObj.addClass('priceChecked');
		$('#roleId').val(firstObj.attr('tag'));
	});
	function choosePrice(el){
		$('.rechargePrice').removeClass('priceChecked');
		$(el).addClass('priceChecked');
		var roleId = $(el).attr('tag');
		$('#roleId').val(roleId);
	}

</script>
